package blue.wireless.mic;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MicActivity extends Activity {
private Button startButton,stopButton;
MicThread mt = new MicThread();


@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.mic_activity);

    startButton = (Button) findViewById (R.id.play);
    stopButton = (Button) findViewById (R.id.stop);

    startButton.setOnClickListener (startListener);
    stopButton.setOnClickListener (stopListener);

    
    System.out.println("minBufSize: " + mt.minBufSize);
}

private final OnClickListener stopListener = new OnClickListener() {

    @Override
    public void onClick(View arg0) {
                mt.status = false;
                mt.recorder.release();
                Log.d("VS","Recorder released");
    }

};

private final OnClickListener startListener = new OnClickListener() {

    @Override
    public void onClick(View arg0) {
                mt.status = true;
                mt.startStreaming();           
    }

};
}

